NoSQL operator: sqlitetotable

Builds a valid NoSQL table from a SQLite database table

Usage: sqlitetable [options] dbfilename [SQL_select_command]

Options:
    --input (-i) 'file'
      Read SQLite interactive commands from 'file' instead of command line.

    --output (-o) 'file'
      Write output to 'file' instead of STDOUT.

     -3
      Use SQLite version 3 as opposed to the default version 2.
      It is assumed the SQLite command-line interface is called
      'sqlite' for v2 and 'sqlite3' for v3.

    --help (-h)
      Display this help text.

    --show-copying
      Display program copying conditions.
                                                          
    --show-warranty
      There is absolutely no warranty for this program.
      Invoke the program with this option for details.

Notes:

If --input is specified then the SQL statment is ignored since the
input file contains all the selection statements that will be needed.
In that case, specify both '.separator ""' and '.header on'.

The command is designed to work with SQLite version 2 and/or 3. If
the executable is named "sqlite3" use the "-3" switch to invoke it.

An example to select certain records from an SQLite database table is

$ sqlitetotable db1.db -o new.tbl 'select * from table where type = '"'new'"

An example just as before but using an input command file is

$ cat input1
.header on
.separator "    " 
select * from table where type == 'new'
$ sqlitetotable -i input1 -o new.tbl db1.db
Back